import Vue from 'vue'
import VueI18n from 'vue-i18n'

Vue.use(VueI18n)
import ElementUIEN from 'element-ui/lib/locale/lang/en'
import ElementUIZH from 'element-ui/lib/locale/lang/zh-CN'
import DemoEN from './en'
import DemoZH from './zh'
export default new VueI18n({
  locale: localStorage.getItem('Lang') || 'zh',
  messages: {
    zh: {
      switchlanguage: '恭喜你成功把页面语言切换成简体中文!',
      morning: '早安!',
      GoodDay: '祝您开心每一天!',
      ...ElementUIZH,
      ...DemoZH
    },
    en: {
      switchlanguage: 'Congratulations on successfully switching the page language to English!',
      morning: 'Good Morning!',
      GoodDay: 'have a good day!',
      ...ElementUIEN,
      ...DemoEN
    }
  }
})
